package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * FinTransTmd02FromSubOrg generated by hbm2java
 */
@Entity
@Table(name="fin_trans_tmd02_from_sub_org"
    ,catalog="lmis"
)
public class FinTransTmd02FromSubOrg  implements java.io.Serializable {


     private FinTransTmd02FromSubOrgId id;
     private FinTrans finTrans;
     private Set<FinTransTmd02FromSubOrgDetail> finTransTmd02FromSubOrgDetails = new HashSet<FinTransTmd02FromSubOrgDetail>(0);

    public FinTransTmd02FromSubOrg() {
    }

	
    public FinTransTmd02FromSubOrg(FinTransTmd02FromSubOrgId id, FinTrans finTrans) {
        this.id = id;
        this.finTrans = finTrans;
    }
    public FinTransTmd02FromSubOrg(FinTransTmd02FromSubOrgId id, FinTrans finTrans, Set<FinTransTmd02FromSubOrgDetail> finTransTmd02FromSubOrgDetails) {
       this.id = id;
       this.finTrans = finTrans;
       this.finTransTmd02FromSubOrgDetails = finTransTmd02FromSubOrgDetails;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="finTransRecNo", column=@Column(name="FIN_TRANS_REC_NO", nullable=false) ), 
        @AttributeOverride(name="subOrgNo", column=@Column(name="SUB_ORG_NO", nullable=false) ), 
        @AttributeOverride(name="fromOrgNo", column=@Column(name="FROM_ORG_NO", nullable=false) ) } )
    public FinTransTmd02FromSubOrgId getId() {
        return this.id;
    }
    
    public void setId(FinTransTmd02FromSubOrgId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="FIN_TRANS_REC_NO", nullable=false, insertable=false, updatable=false)
    public FinTrans getFinTrans() {
        return this.finTrans;
    }
    
    public void setFinTrans(FinTrans finTrans) {
        this.finTrans = finTrans;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="finTransTmd02FromSubOrg")
    public Set<FinTransTmd02FromSubOrgDetail> getFinTransTmd02FromSubOrgDetails() {
        return this.finTransTmd02FromSubOrgDetails;
    }
    
    public void setFinTransTmd02FromSubOrgDetails(Set<FinTransTmd02FromSubOrgDetail> finTransTmd02FromSubOrgDetails) {
        this.finTransTmd02FromSubOrgDetails = finTransTmd02FromSubOrgDetails;
    }




}


